package pl.edu.agh.strategies;

import java.util.List;

import pl.edu.agh.Values;

public class WeekDayAverage extends AbstractStrategy {
	@Override
	public boolean decide(List<Integer> history) {
		int startUpTime = 30;
		if(history.size() < startUpTime)
			return (new Random()).decide(history);
		int weekDaySum = 0;
		int day = history.size()-1;
		while(day > 0){
			weekDaySum += history.get(day);
			day -= 7;
		}
		return rateAndSave(weekDaySum/7);
	}
}
